<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<link type="text/css" rel="stylesheet" href="./css/manage/style.css">
	<script type="text/javascript" src="<%=basePath%>/script/jquery-1.6.2.min.js"></script>
	<style type="text/css">
	.red { color: red; text-align: left; }
	</style>
  </head>
  
  <body>
  	
  		<s:form action="./cas/chaptertips_updateorsave.action" id="chaptertips_updateorsave" method="post">
    	<table width="100%" class="tab_comm">
    			<s:token/>
				
				<tbody>
					<s:if test="#request.treeNodeid!=0">
						<tr>
							<td class="tr fb blue_s">父知识点:</td>
							<s:hidden name="chapter.parentid" id="parentid"></s:hidden>
							<td>${parentname}</td>
						</tr>
					</s:if>
					<tr>
						<td class="tr fb blue_s">知识点名称:</td>
						<td><s:textfield id="name" name="chapter.name" cssClass="name_text" maxlength="75"/><span class="red" style="">*</span></td>
					</tr>
					<tr>
						<td class="tr fb blue_s">描述:</td>
						<td><s:textarea id="description" name="chapter.description" cssClass="name_text" cssStyle="width: 411px; height: 79px;"/></td>
					</tr>
					<tr>
						<td class="tr fb blue_s">状态:</td>
						<td>
							<s:select name="chapter.status" list="#{'1':'启用','0':'停用'}"/>
							<span class="red" style="">*</span>
						</td>
					</tr>
					<tr>
						<td colspan="2">
						<span class="btnC"><input type="button" value="保存" class="btnC_text" onclick="_submit()"/></span>
						</td>
					</tr>
				</tbody>
		</s:form>
    
  </body>
  <script type="text/javascript">
  		function _submit(){
  			var spname=jQuery("#name").val();
  			if(spname==""){
  				alert("名称不能空！");
  				return false;
  			}
  			document.chaptertips_updateorsave.submit();
  		}
  </script>

</html>